//
//  clsDifficult.m
//  AntsExpress
//
//  Created by slccper on 16/1/15.
//  Copyright © 2016年 slccper. All rights reserved.
//

#import "clsDifficult.h"
#import "clsOtherFun.h"
@implementation clsDifficult
-(id)initWithDic:(NSDictionary *)dic
{
    self = [super init];
    if (self) {
        for (int i=0; i<dic.allKeys.count; i++) {
            if ([self respondsToSelector: [clsOtherFun selectorForColumnName:dic.allKeys[i]]]) {
                [clsOtherFun ObjectSetValue:self :dic.allKeys[i] :dic.allValues[i]];
            }
        }
    }
    return self;
}
+(NSMutableArray *) GetDataByArr:(NSArray *) dataList{
    NSMutableArray *WebDataArray=[NSMutableArray array];
    
    for (NSObject * data in dataList) {
        if(![data isKindOfClass:[NSDictionary class]]){
            break;
        }
        NSDictionary *obj=(NSDictionary *)data;
        clsDifficult *objinstance=[[clsDifficult alloc] init];
        for (int i=0; i<obj.allKeys.count; i++) {
            if ([objinstance respondsToSelector: [clsOtherFun selectorForColumnName:obj.allKeys[i]]]) {
                [clsOtherFun ObjectSetValue:objinstance :obj.allKeys[i] :obj.allValues[i]];
            }
        }
        [WebDataArray addObject:objinstance ];
    }
    return WebDataArray;
}
@end
